// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 外部资讯业务类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2023-02-21
 */
public enum ButlerExternalTypeEnum {
    ALL(0, "全部"),
    FRONTIER_TECHNOLOGY(1, "前沿技术"),
    MARKET_PERFORMANCE(2, "市场表现"),
    INDUSTRY_INFORMATION(3, "行业资讯"),
    TECHNOLOGY_SHARING(4, "技术分享");

    private int value;

    private String name;

    ButlerExternalTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        ButlerExternalTypeEnum arrObj[] = ButlerExternalTypeEnum.values();
        for (ButlerExternalTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
